package cn.iocoder.yudao.module.reclaim.controller.app.kefu;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.reclaim.controller.app.kefu.vo.AppAdminKefuRespVO;
import cn.iocoder.yudao.module.reclaim.dal.dataobject.kefu.AdminKefuDO;
import cn.iocoder.yudao.module.reclaim.service.kefu.AdminKefuService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "用户 APP - 客服")
@RestController
@RequestMapping("/reclaim/app-kefu")
@Validated
public class AppAdminKefuController {

    @Resource
    private AdminKefuService adminKefuService;

    @GetMapping("/get-list")
    @Operation(summary = "获得客服")
    public CommonResult<List<AppAdminKefuRespVO>> getAdminKefu() {
        List<AdminKefuDO> adminKefu = adminKefuService.getAdminKefuList();
        return success(BeanUtils.toBean(adminKefu, AppAdminKefuRespVO.class));
    }



}